//
//  BGPlistMaker.swift
//  Baga
//
//  Created by 飞王 on 16/12/28.
//  Copyright © 2016年 飞王. All rights reserved.
//

import UIKit

class BGPlistMaker: NSObject {
    
    public func doMinePlist(){
        
        let shoppingCarDict:Dictionary<String, String> = [
            "icon":"shopping_car",
            "title":"我的购物车",
            "action":"goShoppingCar"
        ];
        
        let myOrderDict:Dictionary<String, String> = [
            "icon":"my_order",
            "title":"我的订单",
            "action":"goShoppingCar"
        ];
        
        let receiveAddressDict:Dictionary<String, String> = [
            "icon":"shopping_car",
            "title":"配送地址",
            "action":"goShoppingCar"
        ];
        
        let changePasswordDict:Dictionary<String, String> = [
            "icon":"change_password",
            "title":"修改密码",
            "action":"goChangePassword"
        ];
        
        let todayPirceDict:Dictionary<String, String> = [
            "icon":"today_pirce",
            "title":"今日菜价",
            "action":"goTodayPirce"
        ];
        
        let bageQRcodeDict:Dictionary<String, String> = [
            "icon":"bage_QZCode",
            "title":"巴格二维码",
            "action":"goBageQZCode"
        ];
        
        let complainSuggestionDict:Dictionary<String, String> = [
            "icon":"complain_suggestion",
            "title":"投诉／建议",
            "action":"goComplainSuggestion"
        ];
        
        let aboutBageDict:Dictionary<String, String> = [
            "icon":"about_bage",
            "title":"关于八格",
            "action":"goAboutBage"
        ];
        
        
        
        let array = NSArray(objects: shoppingCarDict,myOrderDict,receiveAddressDict,changePasswordDict,todayPirceDict,bageQRcodeDict,complainSuggestionDict,aboutBageDict);
        let filePath:String = NSHomeDirectory() + "/Documents/mineData.plist"
        printLog(message: filePath);
        array.write(toFile: filePath, atomically: true)
    }

}
